<template>
  <div class="social-container">
    <div class="app-container">
      <el-button @click="gohome">去首页</el-button>
      <!-- <el-button @click="$router.push('/dashboard')">去首页</el-button> -->
    </div>
  </div>
</template>

<script>
export default {
  name: 'Social',
  methods: {
    gohome() {
      // this.$router.push({ path: 'dashboard', query: { id: 2, name: 'jack' }})
      /* params只能和name组合一起传参不能和path组合    而query和params和name和path都可以组合使用 */
      this.$router.push({ name: 'dashboard', params: { id: 123, age: '张三' }})
    }
  }
}
</script>

<style></style>
